<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>主页面 - 欢迎回来</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <header>
        <h1>欢迎回来！</h1>
        <nav>
            <ul>
                <li><a href="#dashboard">控制台</a></li>
                <li><a href="#profile">个人资料</a></li>
                <li><a href="#settings">设置</a></li>
                <li><button id="logoutBtn" class="logout-button">退出登录</button></li>
            </ul>
        </nav>
    </header>

    <main>
        <section id="dashboard">
            <h2>个人控制台</h2>
            <div class="welcome-message">
                <p id="greeting">正在加载用户信息...</p>
            </div>
            
            <div class="dashboard-stats">
                <div class="stat-card">
                    <h3>我的活动</h3>
                    <p>最近的操作记录将显示在这里。</p>
                </div>
                <div class="stat-card">
                    <h3>我的数据</h3>
                    <p>您的数据统计信息将显示在这里。</p>
                </div>
            </div>
        </section>

        <section id="profile">
            <h2>个人资料</h2>
            <div class="profile-info">
                <p>用户名: <span id="profileUsername">--</span></p>
                <p>注册时间: <span id="profileRegDate">--</span></p>
                <p>上次登录: <span id="profileLastLogin">--</span></p>
            </div>
        </section>

        <section id="settings">
            <h2>设置</h2>
            <form id="settingsForm">
                <div class="form-group">
                    <label for="newPassword">修改密码:</label>
                    <input type="password" id="newPassword" name="newPassword" placeholder="留空则不修改">
                </div>
                <div class="form-group">
                    <label for="confirmNewPassword">确认新密码:</label>
                    <input type="password" id="confirmNewPassword" name="confirmNewPassword" placeholder="留空则不修改">
                </div>
                <button type="submit" id="saveSettingsBtn">保存设置</button>
            </form>
            <p id="settingsMessage" style="margin-top: 15px; display: none;"></p>
        </section>

        <section id="chat">
            <h2>智能问答助手</h2>
            <div id="chatContainer">
                <div id="chatHistory"></div>
                <div id="chatInputContainer">
                    <input type="text" id="questionInput" placeholder="请输入您的问题..." />
                    <label for="fileUpload" class="file-upload-btn">
                        📎
                        <input type="file" id="fileUpload" accept=".pdf" style="display: none;" />
                    </label>
                    <button id="sendQuestionBtn">发送</button>
                </div>
                <p id="chatMessage" style="margin-top: 15px; display: none;"></p>
            </div>
        </section>
    </main>

    <footer>
        <p>&copy; 2023 我的网页. 保留所有权利。</p>
    </footer>

    <script src="main.js"></script>
</body>
</html>